﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.Excel;

namespace TpBaseObjects.Base
{
	public class ProjektLiquiSheet
	{
		
		#region Members

		Worksheet mySheet;
		
		#endregion

		#region Constructor

		public ProjektLiquiSheet(Worksheet sh)
		{
			this.mySheet = sh;
		}

		#endregion

		#region Functions

		public int GetNextFreeRowNumber()
		{
			int ret = 0;
			int currentRow = 2;
			bool weiter = false;
			Range r1;
			Range r2;
			while (weiter == false & currentRow < 10000)
			{
				r1 = mySheet.Rows[currentRow];
				r2 = r1.Cells[1,"H"];
				if (r2.Value == null)
				{
					ret = currentRow;
					weiter = true;
				}
				currentRow++;
			}

			return ret;
		}

		#endregion

	}
}
